package com.ruoyi.bargain.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bargain.mapper.BargainRegistrationMapper;
import com.ruoyi.bargain.domain.BargainRegistration;
import com.ruoyi.bargain.service.IBargainRegistrationService;
import com.ruoyi.common.support.Convert;

/**
 * 砍价报名 服务层实现
 * 
 * @author lzy
 * @date 2019-03-07
 */
@Service
public class BargainRegistrationServiceImpl implements IBargainRegistrationService 
{
	@Autowired
	private BargainRegistrationMapper bargainRegistrationMapper;

	/**
     * 查询砍价报名信息
     * 
     * @param id 砍价报名ID
     * @return 砍价报名信息
     */
    @Override
	public BargainRegistration selectBargainRegistrationById(String id)
	{
	    return bargainRegistrationMapper.selectBargainRegistrationById(id);
	}
	
	/**
     * 查询砍价报名列表
     * 
     * @param bargainRegistration 砍价报名信息
     * @return 砍价报名集合
     */
	@Override
	public List<BargainRegistration> selectBargainRegistrationList(BargainRegistration bargainRegistration)
	{
	    return bargainRegistrationMapper.selectBargainRegistrationList(bargainRegistration);
	}
	
    /**
     * 新增砍价报名
     * 
     * @param bargainRegistration 砍价报名信息
     * @return 结果
     */
	@Override
	public int insertBargainRegistration(BargainRegistration bargainRegistration)
	{
	    return bargainRegistrationMapper.insertBargainRegistration(bargainRegistration);
	}
	
	/**
     * 修改砍价报名
     * 
     * @param bargainRegistration 砍价报名信息
     * @return 结果
     */
	@Override
	public int updateBargainRegistration(BargainRegistration bargainRegistration)
	{
	    return bargainRegistrationMapper.updateBargainRegistration(bargainRegistration);
	}

	/**
     * 删除砍价报名对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBargainRegistrationByIds(String ids)
	{
		return bargainRegistrationMapper.deleteBargainRegistrationByIds(Convert.toStrArray(ids));
	}

	@Override
	public BargainRegistration queryRegistrationByOpenidAndActId(String fxOpenid, String actId) {
		// TODO Auto-generated method stub
		return bargainRegistrationMapper.queryRegistrationByOpenidAndActId(fxOpenid,actId);
	}
	
}
